<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>AjaxLab.com</title>
<STYLE>
BODY {
	MARGIN-LEFT: 1em; MARGIN-RIGHT: 1em
}
BODY {
	FONT-SIZE: 83%; FONT-FAMILY: arial,sans-serif
}
TD {
	FONT-SIZE: 83%; FONT-FAMILY: arial,sans-serif
}
DIV {
	COLOR: #000
}
TD {
	COLOR: #000
}
A:link {
	COLOR: #00c
}
A:visited {
	COLOR: #551a8b
}
A:active {
	COLOR: #f00
}
.topnav {
	LINE-HEIGHT: 130%
}
.indent {
	MARGIN-LEFT: 0.75em; LINE-HEIGHT: 130%
}
.activelink {
	FONT-WEIGHT: bold; MARGIN-LEFT: 0px; COLOR: #2f63b0; LINE-HEIGHT: 130%
}
.footer {
	FONT-SIZE: 73%; COLOR: #666666
}
UNKNOWN {
	COLOR: #000000
}
.toc {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; LIST-STYLE-TYPE: none
}
.toc1 {
	
}
.toc2 {
	PADDING-LEFT: 25pt
}
.toc3 {
	PADDING-LEFT: 50pt
}
H1 {
	FONT-SIZE: 120%
}
</STYLE>
				<link href="ScriptLibrary/windows_js_0.85.2/themes/theme1.css" rel="stylesheet" type="text/css">
				
		<script language="JavaScript" type="text/javascript" src="ScriptLibrary/Atlas/Release/AtlasCompat.js"></script>
		<script language="JavaScript" type="text/javascript" src="ScriptLibrary/Atlas/Release/Atlas.js"></script>
		
		<script language="JavaScript" type="text/javascript" src="ScriptLibrary/scriptaculous-js-1.6.0/lib/prototype.js"></script>
		<script language="JavaScript" type="text/javascript" src="ScriptLibrary/scriptaculous-js-1.6.0/src/effects.js"></script>
		<script language="JavaScript" type="text/javascript" src="ScriptLibrary/windows_js_0.85.2/javascripts/window.js"></script>
	
		<script language="JavaScript" type="text/javascript" src="ScriptLibrary/AjaxLabCommandPrompt/Engine/Abstract/CMD.js"></script>
		<script language="JavaScript" type="text/javascript" src="ScriptLibrary/AjaxLabCommandPrompt/Engine/Core/CMD.js"></script>
		<script type="text/javascript">
		
		
		function pageLoad()
		{
	
			var cmd = new AjaxLab.Engine.Core.Cmd(null,"CmdPrompt",null,"http://www.ajaxlab.com");
			cmd.setIsDebug(false);
			
			var width = $('test_content').offsetWidth;
			$('CmdPrompt').style.width = width+"px";
			
			
			Element.hide('n1');
			Element.hide('n2');
			Element.hide('n3');
			Element.hide('n4');
			Element.hide('n5');
			Element.hide('n6');
			Element.hide('n7');
				
		}
		
		function TryItLive()
		{
			var cmd = document.getElementById('showhideCMD');
			Effect.toggle(cmd,'blind');
		}
		</script>
        <style type="text/css">
<!--
.style1 {color: #CC3300}
.style2 {color: #DE6048}
.style5 {color: #0033FF}
.style6 {color: #0066FF}
.style7 {color: #0000FF}
-->
        </style>
</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="17%" rowspan="2" valign="top" bgcolor="#e5ecf9"><p><span class="activelink">CMD  Experiments </span><br />
    <br />
        <a href="#" onClick="TryItLive();">Try It Live &amp; Navigate <br />
        (type &quot;goto n1&quot; to goto n1 </a><br />
        <br />
        <br />
        </B><b>(N0) Menu 0 </b><br />
        (N1) Menu 1 <br />
      (N2) Menu 2 <br />
        (N3) Menu 3 <br />
        (N4) Menu 4<br />
        (N5) Menu 5 <br />
        (N6) Menu 6 <br />
        (N7) Menu 7 <a 
      href="http://code.google.com/apis/checkout/checkout_xml.html"><br />
        </a><br />
    </p>    </td>
    <td width="83%" valign="top"><FONT 
            style="FONT-SIZE: 120%">&nbsp;<B>AjaxLab Web Command Prompt (LGPL) Documentation <br />
    </B></FONT></td>
  </tr>
  <tr>
    <td valign="top"><p><br />
		<div id="n0">
			  The information on this page is intended for the programmer(s) performing the technical integration of Ajaxlab Command Prompt with your applications<br />
			  <br />
				Where to start? </p>
		  <ul>
			<li><em><strong>(N1) Developer's Guide</strong></em> - This is a very detailed description of how AjaxLab Command Prompt is architectured. If you are into the dirty details, I'll discuss it here. The purpose of the guide is to give those hard-core javascript developer the resource to tweak, change and imporve the web command prompt itself. </li>
		  </ul>
			  <ul>
				<li><em><strong>(N2) Quick Start</strong></em> -Simply insturctions on how to quickly setup ajaxlab command prompt on your website. You don't need any speical framework installed at this point as AjaxLab Command prompt itself is pure javascript. The framework you need only depends on what kinds of command pluginns you will be using. </li>
			  </ul>
			  <ul>
				<li><em><strong>(N3) How To</strong></em>  - Want to develop yoru own commands? Want to create yoru own plugins for other members to share? Learn how to do it here. You only need to create two files and the rest is taken care of by the command prompt framework. </li>
			  </ul>
			  <ul>
				<li><em><strong>(N4) Sample PlugIns</strong></em> - See what plugins are available. *Note, depends on the plugin, it might need php, jsp, or asp.net runtime enviroment. It depends. Currently, only asp.net examples are available, but I need to emphasize again, it can be developed in ANY enviornment </li>
			  </ul>
			  <ul>
				<li><em><strong>(N5) Tips &amp; Tricks </strong></em>- Just a few thigns I thought might be helpful while writing custom plug-ins.</li>
			  </ul>
			  <ul>
				<li><em><strong>(N6) Downloads</strong></em><br />
		        </li>
			    <li><em><strong>(n7) API</strong></em> - Let's look at the methods available under each classes. 
				  <br />
				  <br />
			    </li>
			  </ul>
	  </div>
			<div id="n1">
				<p>Night1. Developer's Guide In Progress.			</p>
			  <p>Command Prompt is composed of the following main categories</p>
				<ul>
				  <li>Engine
				    <ul>
				      <li>Abstract </li>
			          <li>Interface</li>
				      <li>Core</li>
				      <li>PlugIns</li>
				    </ul>
				  </li>
			      <li>Log</li>
			      <li>Util<br />
		          </li>
              </ul>
			    <p>Engine/Abstract classes containes the core logic of the command prompt. It implements much of the details so that plugIn authors don't have to worry about too much. <br />
			      <br />
			    Engine/Interface containes one class. That's the interface class that all custom commands must implment so that we have consistency. <br />
			      <br />
			    Engine/Core in reality should be renamed to Engine/Configuration because it really containes one class for the sole purpose of register Custom Command PlugIns<br />
			      <br />
			      Engine/Plugins of course containes all third party developed PlugIns. Every simple and once done, all you have to do is to register it with the class inside Engine/Core. <br />
			      <br />
			      Log Directory containes my implementation of Log4J (just simple ideas like info, debug, warn, errors and stuff. This gives the PlugIn developers the ability to trace their code while developing PlugIns)<br />
			      <br />
			      Util Directory contains the function necessary to print strings onto the command prompt. It gives the PlugIn developer the ability to mainpulate onscreen activities without doing anything, nada. It offers stuff like print(), println(), append() etc etc. <br />
			      <br />
			      More details to come.....
</p>
			    <p><br />
		          <br /> 
		          <br />
		      </p>
			</div>
			<div id="n2">
				<p>Night2. Quick Start </p>
				<p><br />
				There 
				is really much to do. I dont have the dowloads available yet but you'll get an idea here. <br />
				<br />
				Command Prompt is under a directory called /AjaxLabCommandPrompt, extract this into any directory of your choice under your webroot. I extracted into &quot;/ScriptLibrary&quot; <br />
				<br />
				<br />
			  Include the following libraries into yoru html pages</p>
				<blockquote>
				  <p><br />
			        <br />
				    <span class="style1">&lt;script language=&quot;</span>JavaScript&quot; type=&quot;text/javascript&quot; src=&quot;ScriptLibrary/Atlas/Release/AtlasCompat.js&quot;&gt;<span class="style2">&lt;/script&gt;</span><br />
			        <span class="style1">&lt;script language=&quot;</span>JavaScript&quot; type=&quot;text/javascript&quot; src=&quot;ScriptLibrary/Atlas/Release/Atlas.js&quot;&gt;<span class="style2">&lt;/script&gt;</span><br />
				    <br />
			        <span class="style1">&lt;script language=&quot;</span>JavaScript&quot; type=&quot;text/javascript&quot; src=&quot;ScriptLibrary/AjaxLabCommandPrompt/Engine/Abstract/CMD.js&quot;&gt;<span class="style2">&lt;/script&gt;</span><br />
                    <span class="style1">&lt;script language=&quot;</span>JavaScript&quot; type=&quot;text/javascript&quot; src=&quot;ScriptLibrary/AjaxLabCommandPrompt/Engine/Core/CMD.js&quot;&gt;<span class="style2">&lt;/script&gt;</span><br />
			          </p>
			  </blockquote>
				<p>  The first two libraries are extracted from the .NET Atlas project. Eventhough they are part of .NET Ajax framework, but good javascript is good javasript (the only downside of it is that they are big files)<br />
				  <br />
				  The last two libraries are directly related to Command Prompt. <br />
				  <br />
				  To set up in yoru html page, first you need a textarea with an id say &quot;CmdPrompt&quot;. To initialize it, in your function, simply do<br />
			  </p>
				<blockquote>
				  <p><br />
			        <span class="style5">var</span> cmd = new AjaxLab.Engine.Core.Cmd(null,<span class="style6">&quot;CmdPrompt&quot;</span>,null,<span class="style7">&quot;http://www.AjaxLab.com License LGPL&quot;</span>);<br />
			      cmd.setIsDebug(false);</p>
			  </blockquote>
				<p><br />
                  <br />
				  and you are good to go. <br />
                  <br />
                  Cmd class takes four parmemter				</p>
				<ul>
				  <li>				  Param 1 : the container outsie yoru textarea. (In the future, i will do something about it, for now set it to null</li>
			      <li>Param 2: the ID of your textarea</li>
			      <li>Param 3: the ID of your debug area. If you have a div that can be used for debugging, set it, if not set it to null</li>
			      <li>Param 4: the root of your command prompt. You can set it to &quot;C:/&quot; or whatever. I used my site's url as the root.</li>
              </ul>
			    <p>Finally, because I dont' have a debug area set up on this page, i have to do .setIsDebug(false);<br />
			      <br />
		      There are several basic commands available		      </p>
			    <ul>
                  <li>clear</li>
			      <li>clear debug</li>
			      <li>disable debug</li>
			      <li>disable debug clear</li>
			      <li>enable debug </li>
			      <li>openurl [your url] for example: openurl http://www.limingxu.com
			        <ul>
                        <li>There are still bugs with this command. </li>
		            </ul>
		          </li>
			      <li>cd [directory] for example: cd http://www.limingxu.com</li>
		      </ul>
			    <p>			      <br />
			      That's it. You can start to use AjaxLab Command Prompt <br /> 
			      <br />
			      <br />
			      <br />
			      <br />
		        </p>
			</div>   
			<div id="n3">
				Night3. How To will be here			</div>   
			<div id="n4">
				Sampel Plug In will be gathered, explained and zipped for download here.			<br />
			    <br />
			    Okay, I did a quick LogParser example which can be seen here. <br />
			    <a href="CMDLogParserDemo.aspx">LogParser Command Prompt</a><br />
			    <br />
			    Basically it uses MS LogParser 2.2 as the backend to query my IIS Logs. I developed several comamnds in a plugIn, they are<br />
			    <ul dir="ltr" style="MARGIN-RIGHT: 0px">
                  <ul dir="ltr">
                    <li>
                      <div>webstats top visitors</div>
                    </li>
                    <li>
                      <div>webstats top NonStandardUserAgent</div>
                    </li>
                    <li>
                      <div>webstats top hits </div>
                    </li>
                    <li>
                      <div>webstats top PossibleAttacks </div>
                    </li>
                    <li>
                      <div>webstats top PageErrors </div>
                    </li>
                    <li>
                      <div>webstats top HitsPerPage </div>
                    </li>
                    <li>
                      <div>webstats top RecordedErrors </div>
                    </li>
                    <li>
                      <div>webstats top BrokenLinks </div>
                    </li>
                    <li>
                      <div>webstats top Win32Errors </div>
                    </li>
                    <li>
                      <div>webstats top HttpMethods </div>
                    </li>
                    <li>
                      <div>webstats top BytesSendToClient </div>
                    </li>
                    <li>
                      <div>webstats top BytesSendFromClient </div>
                    </li>
                    <li>
                      <div>webstats top TimeSpendProcessing</div>
                    </li>
                    <li>
                      <div>webstats successful attempts</div>
                    </li>
                  </ul>
		      </ul> 
		      <br />
			    <br />
			</div>   
			<div id="n5">
				Tips and Tricks will be here.			</div>   
			<div id="n6">
				Downloads	soon. 	
			</div>	
			<div id="n7">
				API soon. 	
			</div>			 	
			</td>
  </tr>
  <tr>
    <td valign="top" bgcolor="#e5ecf9">&nbsp;</td>
    <td valign="top">&nbsp;</td>
  </tr>
</table>
<div id="showhideCMD">
		<table id="test_content" width="100%">
			<tr>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td><textarea name="textarea"  rows="10" wrap="virtual" id="CmdPrompt" style="BACKGROUND:#000000; COLOR:#ffffff; width:100%"></textarea></td>
			</tr>
		</table>
</div>
</body>
</html>
